package com.lkm.market2_0.m.steelyarddata;

import com.lkm.frame.otto.LinkBus;
import com.lkm.frame.otto.LinkBusEventFlag;
import com.lkm.frame.otto.ThreadEnforcer;
import com.lkm.market2_0.ExpandConfig;



public class OnOrderAddEvent implements LinkBusEventFlag {

    public static void send(String steelyardMac, OrderEntity orderEntity){
        if (ExpandConfig.instance.isUI()) {
            LinkBus.sendBroadcast(new OnOrderAddEvent(steelyardMac, orderEntity));
        }
    }

    private final OrderEntity orderEntity;
    private final String steelyardMac;

    private OnOrderAddEvent(String steelyardMac, OrderEntity orderEntity) {
        this.orderEntity = orderEntity;
        this.steelyardMac = steelyardMac;
    }

    public OrderEntity getOrderEntity() {
        return orderEntity;
    }

    public String getSteelyardMac() {
        return steelyardMac;
    }

    @Override
    public ThreadEnforcer getThreadEnforcer() {
        return ThreadEnforcer.ANY;
    }

    @Override
    public boolean isStickyBroadcast() {
        return false;
    }
}
